<template>
  <div>
    <!-- <a href="https://vite.dev" target="_blank">
      <img src="/vite.svg" class="logo" alt="Vite logo" />
    </a>
    <a href="https://vuejs.org/" target="_blank">
      <img :src="imagePath" class="logo vue" alt="Vue logo" /> -->
      <!-- <img src="~/vue.svg" class="logo vue" alt="Vue logo" /> -->
    <!-- </a> -->
 
  </div>
  <HelloWorld msg="Vite + Vue" />
    <div>Current Count: {{ counter.count }}</div>
</template>

<script setup>
import { ref } from 'vue'
import HelloWorld from "@/components/HelloWorld.vue";


import { useCounterStore } from '@/stores/counter'

const counter = useCounterStore()

counter.count++
// 自动补全！ ✨
counter.$patch({ count: counter.count + 1 })
// 或使用 action 代替
counter.increment()
counter.increment()
counter.increment()
counter.increment()
const count = ref(0)

// const imagePath = new URL('~/vue.svg', import.meta.url).href;
</script>

<style>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>